public class Demo45 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(()->{
            System.out.println("hello thread");
        });
        t.start();
        t.join(); //main线程会产生阻塞，要等t线程执行完了，main线程的阻塞才会取消
        System.out.println( t.getState()); //获取t线程的状态
    }
}
